@(aid: String) @dm_frame_not("砍价首页", "BargainFriendsApp", "BargainFriendsController") {
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href='@routes.Assets.at("css/bargain_cliques.css")' />
    <section>
        <div class="bargain_top">
            <div class="bargain_top_text clear" style="font-size: 14px;">
                <p class="top_p1" ng-bind="products.name">可莱丝针剂水库面膜10片套装，韩国进口，深层补水，修复毛孔。</p>
                <p class="top_p2">原价<br>￥<span ng-bind="products.price">100.00</span></p>
            </div>
        </div>

            <!-- 帮砍界面 -->
        <div ng-if="id == user.id">
            <div class="bargain_main">
                <div class="old">
                    <p><span>当前价</span><br><span ng-bind="LineActivities.presentPrice | currency: '￥'">￥100.00</span></p>
                </div>
                <div class="new">
                    <p><span>
                        已砍</span><br><span ng-bind="LineActivities.originalPrice - LineActivities.presentPrice | currency: '￥'">
                        ￥0.00</span></p>
                </div>
            </div>
            <div class="bargain_footer">
                <div class="user clear">
                    <div class="user_img">
                        <img src='{{user.headImgUrl}}'>
                    </div>
                    <div class="user_text">
                        <span ng-bind=" TheLineActivitiesUser.nickname"></span>快去找你的好友帮忙砍价吧~
                    </div>
                </div>

                @* <button class="bargain_bnt" ng-if="LineActivities != null" onclick="show1()">
                <img src='@routes.Assets.at("images/kan1.png")' class="img2">
                <span class="bnt_sp">找人帮砍</span>
                </button>*@


                <button class="bargain_bnt2 rightbnt" ng-if="LineActivities != null" onclick="show1()">
                    <span class="bnt_sp2">找人帮砍</span>
                </button>
                <a href="/w/buyimmediately?presentPrice={{LineActivities.presentPrice}}&price={{products.price}}&productId={{products.id}}&sponsorId={{LineActivities.id}}">
                    <button class="bargain_bnt2 leftbnt">
                        <span class="bnt_sp2">立即购买</span>
                    </button>
                </a>

            </div>
        </div>
            <!-- 帮砍界面 end -->
            <!-- 砍完分享界面-->
        <div ng-if="id != user.id">
            <div class="bargain_main share">
                <div class="old_share">
                    <p><span >当前价</span><br><span ng-bind="LineActivities.presentPrice | currency: '￥'">￥100.00</span></p>
                </div>
            </div>
            <div class="bargain_footer clear">
                <div class="user clear" ng-if="UserActivityHistory == null">
                    <div class="user_img">
                        <img src='{{TheLineActivitiesUser.headImgUrl}}'>
                    </div>
                    <div class="user_text" >
                        你的好友 <span ng-bind="TheLineActivitiesUser.nickname"></span> 正在参加砍价活动，快给Ta补上一刀~
                    </div>
                </div>
                <div class="user clear" ng-if="UserActivityHistory != null">
                    <div class="user_img">
                        <img src='{{user.headImgUrl}}'>
                    </div>
                    <div class="user_text" >
                        <span ng-bind="UserActivityHistory.nickname"></span>
                        一出手就砍掉了<span ng-bind=" UserActivityHistory.bargain | currency: '￥'"></span>,刀法了得啊~
                    </div>
                </div>
                <button class="bargain_bnt2 leftbnt" ng-if="UserActivityHistory != null && UserLineActivities == null" ng-click="MeToo()">
                    <span class="bnt_sp2">朕也要</span>
                </button>
                <button class="bargain_bnt2 rightbnt" ng-if="UserActivityHistory != null && UserLineActivities == null" ng-click="LookingForSomeoneToHelpCut()" onclick="show1()">
                    <span class="bnt_sp2">找人帮TA砍</span>
                </button>

                <button class="bargain_bnt" ng-if="UserActivityHistory == null" ng-click="HelpCut()">
                    <img src='@routes.Assets.at("images/kan1.png")' class="img2">
                    <span class="bnt_sp">给Ta补上一刀</span>
                </button>

                <button class="bargain_bnt" ng-if="UserActivityHistory != null && UserLineActivities != null" ng-click="LookingForSomeoneToHelpCut()" onclick="show1()">
                    <img src='@routes.Assets.at("images/kan1.png")' class="img2">
                    <span class="bnt_sp">找人帮TA砍</span>
                </button>
            </div>
        </div>
            <!-- 砍完分享界面end -->

        @* <a href="/w/buyimmediately?presentPrice={{LineActivities.presentPrice}}&price={{products.price}}&productId={{products.id}}"> <button class="bargain_bnt">
        <img src='@routes.Assets.at("images/kan1.png")' class="img2">
        <span class="bnt_sp">立即购买</span>
        </button></a>*@

        <div class="explain" onclick="show2()" style="margin-top: 32px ;">活动说明</div>

        <div class="bargain_cliques_text">
            <p>看看各位大侠的刀法</p>
            <ul>
                <li class="user clear" ng-repeat="activityHistory in ActivityHistory">
                    <div class="user_img">
                        <img src='{{activityHistory.headImgUrl}}'>
                    </div>
                    <div class="user_text">
                        <span ng-bind=" activityHistory.nickname"></span>
                        ，用 天涯明月刀 补了一刀，砍掉 <span class="red" ng-bind=" activityHistory.bargain | currency: '￥'">6</span>
                        元。
                    </div>
                </li>
            </ul>
        </div>

        <div class="bargain_pxc clear" id="bargain_pxc1" onclick="clos1()">
            <div class="img_bar">
                <img src='@routes.Assets.at("images/kan4.png")'>
            </div>
            <p class="red bar_text"><img src='@routes.Assets.at("images/kan6.png")' style="width: 8% ;">找人帮砍？</p>
            <p class="bar_text2">点击右上角，看看还有哪些高手~</p>
        </div>

        <div class="bargain_pxc2 clear" id="bargain_pxc2">
            <div class="pxc2_text">
                <p class="pxc2_p1">活动说明</p>
                <p class="pxc2_p2">
                    1、2016年03月01日开始砍价；<br>
                    2、每人一次砍价机会；<br>
                    3、同一活动商品只可购买一次；<br>
                    4、砍掉的金额视游戏结果而定；<br>
                    5、活动结束后，商品即恢复原价；<br>
                    6、该活动不可与其他活动优惠同时使用。<br>
                </p>
                <p class="pxc2_p3" onclick="clos2()">朕知道了</p>
                <img src='@routes.Assets.at("images/kan12.png")'>
            </div>
        </div>

    </section>

    <script>
            function show1() {
                document.getElementById("bargain_pxc1").style.display = "block"

            }

            function clos1() {
                document.getElementById("bargain_pxc1").style.display = "none"
            }
            function show2() {
                document.getElementById("bargain_pxc2").style.display = "block"

            }

            function clos2() {
                document.getElementById("bargain_pxc2").style.display = "none"
            }
    </script>


}
    <script src='@routes.Assets.at("js/controllers/bargain4friends_controller.js")'></script>

    <script language="javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>

    <script type="text/javascript">
        wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: '@session.get("appid")',
            // 必填，公众号的唯一标识
            timestamp:'@session.get("timestamp")' ,
            // 必填，生成签名的时间戳
            nonceStr: '@session.get("nonce")',
            // 必填，生成签名的随机串
            signature: '@session.get("signature")',
            // 必填，签名，见附录1
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                /*   'onMenuShareQQ',
                 'onMenuShareWeibo',*/
            ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });

        wx.ready(function() {

//分享给朋友
            wx.onMenuShareAppMessage({
                title: '莲洲.铁皮石斛微商城', // 分享标题
                desc: '小伙伴们,快来一起帮忙砍价吧', // 分享描述
                link: window.location.protocol + '//' + window.location.host + '/w/bargain4friends/' + @aid, // 分享链接
                imgUrl: window.location.protocol + '//' + window.location.host + '/assets/img/6.jpg', // 分享图标
                type: 'link', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function () {
                    //alert("got it");
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    //alert("got it cancel");
                    // 用户取消分享后执行的回调函数
                }
            });


            wx.onMenuShareTimeline({
                title: '莲洲.铁皮石斛微商城', // 分享标题
                link: window.location.protocol + '//' + window.location.host + '/w/bargain4friends/' + @aid, // 分享链接
                imgUrl: window.location.protocol + '//' + window.location.host + '/assets/img/6.jpg', // 分享图标
                success: function () {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });

            wx.error(function(res) {
                //alert(res.errMsg);
            });

        });



</script>






